let array = [1,2,3,4,5,6]
//slice 纯函数
console.log(array.slice(0,3))
console.log(array.slice(0,3))
console.log(array.slice(0,3))
//splice 不是纯函数
console.log(array.splice(0,3))
console.log(array.splice(0,3))
console.log(array.splice(0,3))

// 纯函数
function addNum(n1,n2){
    return n1+n2;
}
console.log(addNum(1,2))
console.log(addNum(1,2))
console.log(addNum(1,2))